//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "adminActions\fn_moderation.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_isAdmin","_player","_dialog"];
_player = _this select 0;			 

if (player != _player) exitWith { };

if (GVAR(AdminCmds) == 1) then { 
	_isAdmin = serverCommandAvailable "#kick" || !isMultiplayer;
	if (!isnil "mp_rights_fnc_isAdmin") then {
		_isAdmin = _isAdmin || ([] call mp_rights_fnc_isAdmin) || ([] call mp_rights_fnc_isModerator);
	};
	if (_isAdmin) then {
		_dialog = createDialog QGVAR(ui_moderation);
	}else {
		hint localize "STR_MSO_AA_CMD_NA";
	};	
};
if (!isnil "d_commandingMenuIniting") then { d_commandingMenuIniting = false; }